define(function () {
    var StatusBar = {
        name: 'status-bar',
        template: ''
        + '<div class="status-bar" :class="classStatusObj">'
        +   '<i class="status-bar-icon" :class="classTypeObj"></i>'
        +   '<slot></slot>'
        + '</div>',
        props: {
            type: String,
            status: String
        },
        data: function () {
            return {
                classStatusObj: {
                    'status-bar-done': this.status === 'done',
                    'status-bar-fail': this.status === 'fail',
                    'status-bar-await': this.status === 'await',
                    'status-bar-current': this.status === 'current'
                },
                classTypeObj: {
                    'icon-tel': this.type === 'tel',
                    'icon-air': this.type === 'air',
                    'icon-plan': this.type === 'plan',
                    'icon-done': this.type === 'done',
                    'icon-fail': this.type === 'fail',
                    'icon-await': this.type === 'await'
                }
            }
        }
    };

    return StatusBar;
});
